home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98b.txt
/
000155_icon-group-sender _Mon Aug 24 09:08:44 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
3KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) with SMTP id JAA03330
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Mon, 24 Aug 1998 09:08:44 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA14216; Mon, 24 Aug 1998 09:08:20 -0700
Message-Id: <2.2.32.19980822053809.003390d8@pop5.ibm.net>
X-Sender: usinet.laturk@pop5.ibm.net (Unverified)
X-Mailer: Windows Eudora Pro Version 2.2 (32)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sat, 22 Aug 1998 00:38:09 -0500
To: icon-group@optima.CS.Arizona.EDU
From: "Dr. Louis A. Turk" <laturk@ibm.net>
Subject: Why doen't this work?
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 1859
Can anybody tell me why this code only removes CR/LF's every other paragraph
that contains them? Why
does it skip a paragraph?
Louis
Obviously, there will be more to this program, once I get past this problem.
############################################################################
#############
#
# HTML TO Nota Bene 4.5 FILTER
# Ver. 1.0 Aug.
# Programmer: Louis A. Turk
#
# USE: Coverts HTML to Note Bene using two passes. FIRST PASS:
# 1. Removes the CR/LF's between <P> and </P>
# 2. Removes the CR/LF's between <UL> and </UL> and also removes right
indention.
# SECOND PASS:
# 3. Replaces all HTML code with Nota Bene code.
#
############################################################################
##############
link graphics
procedure main(arg)
WOpen("size=1005,850")
infile := arg[1]
outfile := arg[2]
tempfile := "temp3.txt"
in := open(infile,"r") | stop("Can't open file: ",in)
out := open(outfile,"w") | stop("Can't open file: ",out)
tmp := open(tempfile,"c") | stop("Can't open file: ",tmp)
#### FIRST PASS: REMOVE EXCESS CR/LF's
######################################
while line := read(in) do {
if find(line,"<P>") then { # Beginning of
defective code
WWrites(line," ")
writes(tmp,line," ")
until find(line := read(in),"</P>") do {
WWrites(line," ")
writes(tmp,line," ")
}
WWrite(line)
write(tmp,line)
}
else if find(line,"<UL>") then {
WWrites(line," ")
writes(tmp,line," ")
until find(line := read(in),"</UL>") do {
WWrites(line," ")
writes(tmp,line," ")
}
WWrite(line)
write(tmp,line)
} # End of defective
code
else {
WWrite(line)
write(tmp,line)
}
}
##### SECOND PASS: #######################################
Event()
end